<template>
  <div class="child-components">
    这是一个子组件
    <div>
      <span>这是来自于父组件的数据：</span>
      <input :value="modelValue" @input="$emit('update:modelValue', $event.target.value)" />
    </div>
  </div>
</template>

<script>
export default {
  props: ["modelValue"],
  emits: ["update:modelValue"],
  setup(props) {
    console.log(props.modelValue);
  },
};
</script>

<style scoped>
.child-components {
  width: 300px;
  height: 300px;
  background-color: aqua;
}
</style>